<template>
  <div class="col-sm-3 col-md-2 sidebar">
    <router-link to="/students">
      <h2>Vue MS</h2>
    </router-link>
    <ul class="nav nav-sidebar">
      <router-link to="/students" tag="li">
        <a>信息管理</a>
      </router-link>
      <router-link to="/newstudent" tag="li">
        <a>添加信息</a>
      </router-link>
      <router-link to="/studenthistory" tag="li">
        <a>信息回收</a>
      </router-link>
    </ul>
    <ul class="nav nav-sidebar">
      <router-link to="/msg" tag="li">
        <a>留言板</a>
      </router-link>
      <router-link to="/newmsg" tag="li">
        <a>添加留言</a>
      </router-link>
    </ul>
    <ul class="nav nav-sidebar">
      <router-link to="/admin" tag="li">
        <a>用户信息</a>
      </router-link>
    </ul>
  </div>
</template>
<script>
export default {};
</script>
<style scoped>
h2 {
  margin: 30px 0;
  color: #fff;
  width: 120px;
  padding-bottom: 10px;
  border-bottom: 1px solid #fff;
}
a:hover {
  text-decoration: none;
}
a:visited {
  text-decoration: none;
}
a:active {
  text-decoration: none;
}
a:link {
  text-decoration: none;
}
.sidebar {
  background: #001529;
}
.sidebar a {
  color: #a6adb4;
}
.nav-sidebar {
  margin-right: -21px;
  margin-bottom: 20px;
  margin-left: -20px;
}

.nav-sidebar > li > a {
  padding-right: 20px;
  padding-left: 20px;
}
.nav-sidebar > li a:hover{
  background-color: #428bca;
  color: white
}

.nav-sidebar > .active > a,
.nav-sidebar > .active > a:hover,
.nav-sidebar > .active > a:focus {
  color: #fff;
  background-color: #428bca;
}

.main {
  padding: 20px;
}

@media (min-width: 768px) {
  .sidebar {
    position: fixed;
    top: 0px;
    bottom: 0;
    left: 0;
    z-index: 1000;
    display: block;
    padding: 0 20px;
    overflow-x: hidden;
    overflow-y: auto;
    border-right: 1px solid #eee;
  }
}
</style>

